home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 24 / CU Amiga Magazine's Super CD-ROM 24 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-07].iso / CUCD / Utilities / vim-5.1 / syntax / python.vim < prev    next >
Encoding:
Text File  |  1998-01-19  |  1.4 KB  |  44 lines

  1. " Vim syntax file
  2. " Language:    Python
  3. " Maintainer:    Neil Schemenauer <nascheme@acs.ucalgary.ca>
  4. " Last change:    1998 January 17
  5.  
  6. " Remove any old syntax stuff hanging around
  7. syn clear
  8.  
  9. syn keyword pythonStatement        break continue del
  10. syn keyword pythonStatement        except exec finally
  11. syn keyword pythonStatement        pass print raise
  12. syn keyword pythonStatement        return try
  13. syn keyword pythonRepeat        for while
  14. syn keyword pythonConditional        if elif else then
  15. syn keyword pythonOperator        and in is not or
  16. syn region  pythonString        start=+'+  end=+'+ skip=+\\\\\|\\'+
  17. syn region  pythonString        start=+"+  end=+"+ skip=+\\\\\|\\"+
  18. syn region  pythonString        start=+"""+  end=+"""+
  19. syn region  pythonString        start=+'''+  end=+'''+
  20. syn keyword pythonFunction        def class lambda
  21. syn keyword pythonPreCondit        import from
  22. syn match   pythonComment        "#.*$" contains=pythonTodo
  23. syn keyword pythonTodo            contained TODO FIXME XXX
  24.  
  25. syn sync lines=100
  26.  
  27. if !exists("did_python_syntax_inits")
  28.   let did_python_syntax_inits = 1
  29.   " The default methods for highlighting.  Can be overridden later
  30.   hi link pythonStatement        Statement
  31.   hi link pythonConditional        Conditional
  32.   hi link pythonRepeat            Repeat
  33.   hi link pythonString            String
  34.   hi link pythonOperator        Operator
  35.   hi link pythonFunction        Function
  36.   hi link pythonPreCondit        PreCondit
  37.   hi link pythonComment            Comment
  38.   hi link pythonTodo            Todo
  39. endif
  40.  
  41. let b:current_syntax = "python"
  42.  
  43. " vim: ts=8
  44.